<{include file="public/header.html"}>
<BODY background="<{$VIRT_IMAGES}>/bk.jpg">

<!-- Load Ext. Libs -->
<link rel="stylesheet" type="text/css" href="<{$VIRT_JSCRIPT}>/ext/res/css/ext-all.css"/>
<script type="text/javascript" src="<{$VIRT_JSCRIPT}>/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<{$VIRT_JSCRIPT}>/ext/ext-all.js"></script>

<div id="body_content" title="my window title" >
<FORM name="ff" action="./taskLogList.php" method="post">
<input type="hidden" name="strAction" value="">
<input type="hidden" name="strProjectID" value="<{ $sProjectID }>">

<TABLE class="box" align="center" width="100%" border="0">
<TR><TD>
    <table id="tbl" border="0" width="100%" cellpadding='0' cellSpacing="0">
    <TR><TD class="menubox" align="center" colspan="4"><br/>
        <font size="+1">任务信息</font><br/><br/>
    </TD></TR>
    <tr>
    <td height="24" class="TDLabel" width="12%">任务编号：</td>
    <td width="30%"><input type="text" name="strProjectCode" value="<{$aProject.PROJECTCODE}>" 
    class="TEXT" maxlength="50" size="20" <{$isEnableEdit}>></td>
    <td class="TDLabel" width="12%">任务类别：</td>
    <td><input type="text" name="strProjectType" value="<{$aProject.PROJECTTYPE}>" 
    class="TEXT" maxlength="30" size="20" <{$isEnableEdit}>></td>
    </tr>
    <tr>
    <td height="24" class="TDLabel">任务名称：</td>
    <td colspan="3">
    <input type="text" name="strProjectName" value="<{$aProject.PROJECTNAME}>" 
    class="TEXT" maxlength="250" size="80" <{$isEnableEdit}>><{ getRedStar }></td>
    </tr>
    <tr>
    <td height="24" class="TDLabel">任务开始日期：</td>
    <td><input type="text" name="strStartDate" value="<{$aProject.STARTDATE}>" 
    class="TEXT" maxlength="10" size="10" id="date1" <{$isEnableEdit}>>
    <img src="../../images/cal.gif" style="cursor:hand;" id="image1"></td>
    <td class="TDLabel">任务结束日期：</td>
    <td><input type="text" name="strFinishDate" value="<{$aProject.FINISHDATE}>" 
    class="TEXT" maxlength="10" size="10" id="date2" <{$isEnableEdit}>>
    <img src="../../images/cal.gif" style="cursor:hand;" id="image2"></td>
    </tr>
    <tr>
    <td height="24" class="TDLabel">任务优先级：</td>
    <td><select name="strPriority" size="1" style="width:160;" <{$isEnableEdit}>>
    <{ html_options options=$aMailImportance selected=$sMailImportance }>
    </select></td>
    <td class="TDLabel">任务负责人：</td>
    <td>
<{ if $sUserRole==$RIGHT_ADMIN && $isEnableEdit==""}>
    <select name="strManager" size="1" style="width:160;" <{$isEnableEdit}>>
    <{ html_options options=$aManager selected=$sDefaultManager }>
    </select>
<{ else }> <{ $sManager }> 
<{ /if }>
    </td>
    </tr>
    <tr>
    <td height="24" class="TDLabel">任务说明：</td>
    <td colspan="3"><textarea name="strContent" rows="10" cols="80" <{$isEnableEdit}>><{$aProject.CONTENT}></textarea></td>
    </tr>
    <tr valign="bottom">
    <td colspan="4" height="30" align='center'>
        <input type="button" name="reset1"  value=" 重置 " class="button" onclick="ff.reset();"> 
        <input type="button" name="submit1" value=" 保存 " class="button" onclick="saveForm();"> 
        &nbsp; &nbsp; 
        <input type="button" name="btnReturn" value="返回一览表" class="button" 
        onclick="window.location.href='./taskLogList.php';"> 
    </td>
    </tr>
    </table>
</td></tr>
</TABLE>
</FORM>
</div>

<script language="javascript">
<!--
function saveForm() {
    var i=0;
    var sWorkday="";

    if (ff.strProjectName.value == "") {
        return msg(ff.strProjectName ,"任务名称不能为空！请输入。",1);
    }
    if (!checkDateFormat(ff.strStartDate,true,"任务开始日期的格式不正确")) return false;
    if (!checkDateFormat(ff.strFinishDate,true,"任务结束日期的格式不正确")) return false;
    if (calcUTFByte(ff.strProjectCode.value) > 50)  return msg(ff.strProjectCode,"输入的任务编号的长度超出范围！",1);
    if (calcUTFByte(ff.strProjectType.value) > 30)  return msg(ff.strProjectType,"输入的任务类别的长度超出范围！",1);
    if (calcUTFByte(ff.strProjectName.value) > 250) return msg(ff.strProjectName,"输入的任务名称的长度超出范围！",1);
    
    ff.strAction.value = "<{ $ACTION_SAVE }>";
    ff.submit();
}

var window_title = '任务计划 >> 任务计划问题记录';
/*******/
Ext.onReady(function() {

    if (win == null) {
        var win = new Ext.Window({
            title    : body_content.title, //'任务计划 >> 任务计划问题记录',
            region    : 'center',
            //plain : true, //true则主体背景透明，false则主体有小差别的背景色，默认为false
            //iconCls : 'my-icon',
            //minimizable : true,
            collapsible : true,
            maximizable : true,
            closable : true,
            tools : [{id:'help',qtip:'help content',handler:function(event,toolEl,panel) {alert('hhelp');}}],
            margins : '2 1 2 0', //top,right,bottom,left
            //html : body_content.innerHTML,
            contentEl : 'body_content',
            // bbar:[{text:"确定"},{text:"取消",handler:function(){w.close();}}],//bottom部
            buttons:[{text:"确定"},{text:"取消",handler:function(){alert('cancel?');}}],//footer部
            buttonAlign:"center"  //footer部按钮排列位置,这里是中间
        });
        win.show();
    }

    //ad bar at right panel
    var ad_bar = new Ext.Window({
        title : '广告条',
        region : 'east',
        width : 180,
        hideBorders : true,
        //border : true,
        closable : true,
        margins : '2 1 2 0',
        cmargins : '1 1 1 0',
        html:"<div id='ad'></div>"
    });
    ad_bar.on("close", function() {if (win!=null && win.isVisible()) win.maximize();});
    ad_bar.show();

   var viewport = new Ext.Viewport({
        layout:'border',
        items:[win,ad_bar]
        //items:[win]
    });

});
/********/

//-->
</script>

<{include file="public/footer.html"}>